﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Syndication;
using System.ServiceModel.Web;
using NCMIS.ObjectModel;
using NCMIS.AccessControl;
using NCMIS.ObjectModel.MetaData;
using NCMIS.Produce;

namespace NCMIS.ServiceModel.Ra
{
    public partial interface IService
    {
        [IncludeXmlDeclaration]
        [OperationContract(Name = "createFolder")]
        Atom10ItemFormatter CreateFolder(string repositoryId, string folderId, SyndicationItem inputEntry);

        [IncludeXmlDeclaration]
        [OperationContract(Name = "getAllowableActions")]
        AllowableActions GetAllowableActions(string repositoryId, string objectId);

        [IncludeXmlDeclaration]
        [OperationContract(Name = "getObject")]
        Atom10ItemFormatter GetObject(string repositoryId, string objectId);

        [IncludeXmlDeclaration]
        [OperationContract(Name = "getObjectByPath")]
        Atom10ItemFormatter GetObjectByPath(string repositoryId, string path, string filter, bool includeAllowableActions, string includeRelationships, string renditionFilter, bool includePolicyIds, bool includeACL);

        [IncludeXmlDeclaration]
        [OperationContract(Name = "getContentStream")]
        Stream GetContentStream(string repositoryId, string objectId);

        [IncludeXmlDeclaration]
        [OperationContract(Name = "getRenditions")]
        Renditions GetRenditions(string repositoryId, string objectId, string renditionFilter, string maxItems, string skipCount);

        [IncludeXmlDeclaration]
        [OperationContract(Name = "updateProperties")]
        TokenedCmisObjectId UpdateProperties(string repositoryId, string objectId, Stream stream);

        [IncludeXmlDeclaration]
        [OperationContract(Name = "moveObject")]
        void MoveObject(string repositoryId, string objectId, string targetFolderId, string sourceFolderId);

        [IncludeXmlDeclaration]
        [OperationContract(Name = "deleteObject")]
        void DeleteObject(string repositoryId, string objectId);

        [IncludeXmlDeclaration]
        [OperationContract(Name = "deleteTree")]
        string[] DeleteTree(string repositoryId, string folderId);

        [IncludeXmlDeclaration]
        [OperationContract(Name = "setContentStream")]
        TokenedDocumentId SetContentStream(string repositoryId, string objectId, Stream stream);

        [IncludeXmlDeclaration]
        [OperationContract(Name = "deleteContentStream")]
        TokenedDocumentId DeleteContentStream(string repositoryId, string objectId);
    }
}
